/*
 * zzllrr Mather
 * zzllrr@gmail
 * Released under MIT License
 */

wiki['Diophantus']=Kx(

	detail('$n=x^2+y^2$ 两平方和 Sums of two squares' ,
	brA([
		ksc(['素数p=x^2+y^2 ⇔ '+kmod('p','1',4)])+scbox("Fermat's theorem on sums of two squares"),
		
		ksc(['n=x^2+y^2 ⇔ n因子中的奇素数p=4k+3，即'+kmod('p','-1',4)+'的次数不是奇数']),
		'例如：'+ksc(['2450 = 2 · 5^2 · 7^2 = 7^2+49^2', '3430=2 · 5 · 7^3 无法写成两数平方和']),

		ksc(['素数p=x^2+2y^2 ⇔ '+kmod('p','1或3',8)]),
		ksc(['素数p=x^2+3y^2 ⇔ '+kmod('p',1,3)]),
		ksc(['素数p=x^2+5y^2 ⇔ '+kmod('p','1或9',20)]),
		ksc(['素数p，2p=x^2+5y^2 ⇔ '+kmod('p','3或7',20)]),

	])+



	refer([
		enwiki("Fermat's_theorem_on_sums_of_two_squares",'2019-11-21'),
		enwiki("Sum_of_two_squares_theorem",'2020-8-31'),
		enwiki("Brahmagupta–Fibonacci_identity",'2020-8-31'),
		enwiki("Pell's_equation",'2020-9-1'),
		

	]))+


	detail('$n=x^2+y^2+z^2$ 三平方和 Sums of three squares' ,
	
	ksc(['n=x^2+y^2+z^2 ⇔ n \\ne 4^a(8b+7) 其中a,b非负整数'])+scbox("Legendre's three-square theorem")+
	refer([
		enwiki("Legendre's_three-square_theorem",'2019-11-21'),

	]))+


	detail('$n=x^2+y^2+z^2+w^2$ 四平方和 Sums of four squares' ,
	
	ksc(['∀n∈ℤ, n=x^2+y^2+z^2+w^2 其中x,y,z,w∈ℤ'])+scbox("Lagrange's four-square theorem")+
	XML.wrapE('p','表示的方法数可能不止一种')+
	ksc('表示种数r_4(n)='+piece([['8\\sum _{m|n}m','n是奇数'],['24\\sum _{奇数m|n}m','n是偶数']])+
	'=8\\sum _{m|n,4∤m}m')+scbox("Jacobi's four-square theorem")+br+
	ksc('特别地，当n是素数p时，r_4(p)=8(p+1)')+
	refer([
		enwiki("Lagrange's_four-square_theorem",'2019-11-21'),
		enwiki("Jacobi's_four-square_theorem",'2019-11-21'),

	]))+




	detail('$x^2+(x+1)^2+⋯+(x+n)^2 = (x+n+1)^2+⋯+(x+2n)^2$ 连续平方和 Sums of consecutive squares' ,
	
	['使用下方JS代码',
	sceg("Arrf(function(x){var a=x*(2*x+1), q1=seqA(a,x+1), q2=seqA(a+x+1,x),s1=Mfn.oprs('+',Arrf(function(y){return Mfn.opr1('^2',y)},q1)),s11=Plus(Arrf(function(y){return y+'^2'},q1)), s2=Plus(Arrf(function(y){return y+'^2'},q2));return s11.toStr()+' = '+s2.toStr()+' = '+Mfn.opr1('=',s1).toStr()},seqA(1,10))",10),
	'易得知',
].concat(
	ksc([
		'3^2+4^2 = 5^2 = 25',
		'10^2+11^2+12^2 = 13^2+14^2 = 365',
		'21^2+22^2+23^2+24^2 = 25^2+26^2+27^2 = 2030',
		'36^2+37^2+38^2+39^2+40^2 = 41^2+42^2+43^2+44^2 = 7230',
		'55^2+56^2+57^2+58^2+59^2+60^2 = 61^2+62^2+63^2+64^2+65^2 = 19855',
		'78^2+79^2+80^2+81^2+82^2+83^2+84^2 = 85^2+86^2+87^2+88^2+89^2+90^2 = 45955',
		'105^2+106^2+107^2+108^2+109^2+110^2+111^2+112^2 = 113^2+114^2+115^2+116^2+117^2+118^2+119^2 = 94220',
		'136^2+137^2+138^2+139^2+140^2+141^2+142^2+143^2+144^2 = 145^2+146^2+147^2+148^2+149^2+150^2+151^2+152^2 = 176460',
		'171^2+172^2+173^2+174^2+175^2+176^2+177^2+178^2+179^2+180^2 = 181^2+182^2+183^2+184^2+185^2+186^2+187^2+188^2+189^2 = 308085',
		'210^2+211^2+212^2+213^2+214^2+215^2+216^2+217^2+218^2+219^2+220^2 = 221^2+222^2+223^2+224^2+225^2+226^2+227^2+228^2+229^2+230^2 = 508585',
		'⋮',
		'p^2+(p+1)^2+⋯+(p+n)^2 = (p+n+1)^2+⋯+(p+2n)^2',
		'其中p=2n(2n+1)/2=n(2n+1) 偶数序号的三角数'
])).join(br)+
	refer([
		enwiki("Faulhaber's_formula",'2019-11-21'),
		href(Hs+'search.proquest.com/openview/f8786728002514b2de4eaa379d175640/1?pq-origsite=gscholar&cbl=2035960','Derby, Nigel (2015), "A search for sums of powers", The Mathematical Gazette.'),

	]))+


	detail('$n=x^3+y^3+z^3$ 三立方和 Sums of three cubes' ,detail(ksc(kmod('n','±4',9,1)),
ksc(['∵',
	kmod('x^3≡(x \\mod 9)^3','0,±1',9),
	kmod('y^3≡(y \\mod 9)^3','0,±1',9),
	kmod('z^3≡(z \\mod 9)^3','0,±1',9),
	'∴（\\ne）'+kmod('n=x^3+y^3+z^3','±4',9,1),
]).concat(
	'附录：'+ksc('∀k∈ℤ, '),
	'使用下方JS代码',
	sceg("Arrf(function(y){return Arrf(function(x){return Mod(x**2,y)+''},seqA(1,20))},seqA(2,20))"),
	'易得知'
).concat(ksc([
	kmod('k^2','0,1','2,3,4'),
	kmod('k^2','0,±1','5'),
	kmod('k^2','0,1,-2,3','6'),
	kmod('k^2','0,1,-3,2','7'),
	kmod('k^2','0,1,4','8'),
	kmod('k^2','0,1,4,-2','9'),
	kmod('k^2','0,±1,±4,5','10'),
	kmod('k^2','0,1,4,-2,5,3','11'),
	kmod('k^2','0,1,4,-3','12'),
	kmod('k^2','0,±1,±3,±4','13'),
])).concat(
	'使用下方JS代码',
	sceg("Arrf(function(y){return Arrf(function(x){return Mod(x**3,y)+''},seqA(1,20))},seqA(2,20))"),
	'易得知'
).concat(ksc([
	kmod('k^3','0,1','2'),
	kmod('k^3','0,±1','3,4,7,9'),
	kmod('k^3','0,±1,±2','5'),
	kmod('k^3','0,±1,±2,3','6'),
	kmod('k^3','0,±1,±3','8'),
	kmod('k^3','0,±1,±2,±3,±4,5','10'),

	kmod('k^3','0,±1,±2,±3,±4,±5','11'),
	kmod('k^3','0,±1,±3,±4,±5','12'),
	kmod('k^3','0,±1,±5','13'),
	kmod('k^3','0,±1,±6,7','14'),
	kmod('k^3','0,±1,±2,±3,±4,±5,±6,±7','15'),

])).concat(
	'使用下方JS代码',
	sceg("Arrf(function(y){return Arrf(function(x){return Mod(x**4,y)+''},seqA(1,20))},seqA(2,20))"),
	'易得知'

).concat(ksc([
	kmod('k^4','0,1','2,3,4,5,8,16'),
	kmod('k^4','0,1,-2,3','6'),
	kmod('k^4','0,1,2,-3','7'),
	kmod('k^4','0,1,2,-4','9'),
	kmod('k^4','0,1,-4,5','10,20'),

	kmod('k^4','0,1,-2,3,4,5','11'),
	kmod('k^4','0,1,4,-3','12'),
	kmod('k^4','0,1,-4,3','13'),
	kmod('k^4','0,1,2,-3,4,-5,-6,7','14'),
	kmod('k^4','0,1,6,-5','15'),
	kmod('k^4','0,±1,±4','17'),




])).join(br))+
detail('$1=x^3+y^3+z^3$ 费马立方数 Fermat cubic' ,
		
	'参数解如下：'+br+
	ksc([
		'u=s^2+st+t^2',
		'v=tu-3',
		'x(s,t)='+frac('3t-1\\/3u^2','v',''),
		'y(s,t)='+frac('3(s+t)+1\\/3u^2','v',''),
		'z(s,t)='+frac('-3-u(s+t)','v',''),

	]).join(br)+
	
	refer([
		enwiki('Fermat_cubic','2019-11-21'),

]))+

Table([$A(ZLR('n x y z'))],[
		
[0,0,0,0],
[0,'a','-a',0],
[1,0,0,1],
[1,'9a^4','3a-9a^4','1-9a^3'],
[2,0,1,1],
[2,'1+6a^3','1-6a^3','-6a^2'],
[2,1214928,3480205,-3528875],
[2,34104275617,-25282289375,-33071554596],
[2,3737830626090,1490220318001,-3815176160999],
[3,1,1,1],
[3,4,4,-5],
[3,'569936821221962380720','-569936821113563493509','-472715493453327032'],
[6,-1,-1,2],
[7,0,-1,2],
[8,0,0,2],
[9,0,1,2],
[10,1,1,2],
[11,-2,-2,3],
[12,7,10,-11],
[15,-1,2,2],
[16,-511,-1609,1626],
[17,1,2,2],
[18,-1,-2,3],
[19,0,-2,3],
[20,1,-2,3],
[21,-11,-14,16],
[24,-2901096694,-15550555555,15584139827],
[25,-1,-1,3],
[26,0,-1,3],
[27,0,0,3],
[28,0,1,3],
[29,1,1,3],
[30,-283059965,-2218888517,2220422932],
[33,'8866128975287528','-8778405442862239','-2736111468807040'],
[34,-1,2,3],
[35,0,2,3],
[36,1,2,3],
[37,0,-3,4],
[38,1,-3,4],
[39,117367,134476,-159380],
[42,'-80538738812075974','80435758145817515','12602123297335631'],
[43,2,2,3],
[44,-5,-7,8],
[45,2,-3,4],
[46,-2,3,3],
[47,6,7,-8],
[48,-23,-26,31],
[51,602,659,-796],
[52,23961292454,60702901317,-61922712865],
[53,-1,3,3],
[54,-7,-11,12],
[55,1,3,3],
[56,-11,-21,22],
[57,1,-2,4],
[60,-1,-4,5],
[61,0,-4,5],
[62,2,3,3],
[63,0,-1,4],
[64,0,0,4],
[65,0,1,4],
[66,1,1,4],
[69,2,-4,5],
[70,11,20,-21],
[71,-1,2,4],
[72,7,9,-10],
[73,1,2,4],
[74,'-284650292555885','66229832190556','283450105697727'],
[75,4381159,435203083,-435203231],
[78,26,53,-55],
[79,-19,-33,35],
[80,69241,103532,-112969],
[81,10,17,-18],
[82,-11,-11,14],
[83,-2,3,4],
[84,-8241191,-41531726,41639611],
[87,-1972,-4126,4271],
[88,3,-4,5],
[89,6,6,-7],
[90,-1,3,4],
[91,0,3,4],
[92,1,3,4],
[93,-5,-5,7],
[96,10853,13139,-15250],
[97,-1,-3,5],
[98,0,-3,5],
[99,2,3,4],
[100,7,-3,-6],
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[114,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
[165,'-385495523231271884','383344975542639445','98422560467622814'],
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[390,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[579,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[627,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[633,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[732,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
[906,'-74924259395610397','72054089679353378','35961979615356503'],
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[921,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
fcb('yellow','red',[975,'?','?','?']),
ZLR('⋮ ⋮ ⋮ ⋮'),
[1000,'','','']

	],'wiki').replace(/____/g,br)+refer([
		enwiki('Sums_of_three_cubes','2019-11-21'),
		enwiki('Sums_of_powers','2019-11-21'),
		href(H+'www.xikuang.ren/science/181.html','整数 42 被攻破，数学猜想的证明获得重大推进')+', 西狂, 2019-9-8',
		href(H+'www.asahi-net.or.jp/~KC2H-MSM/mathland/math04/matb0100.htm','chapter 4')+', Hisanori Mishima, 2019-10-11',
		href(H+'math.mit.edu/~drew/Waterloo2019.pdf')+', 2019-11-21',
	]))
	



	
)+brA([

detail(ksc(sum('i',1,'n','i^p','','')+'=1^p+2^p+⋯+n^p')+' 前n个正整数的等幂和' ,

	ksc([
		sum('i',1,'n','i^p','','')+' = 1\\/{p+1}'+sum('j',0,'p',binom('p+1','j')+'B_jn^{p+1-j}','',''),
		kxf('阴影形式 Umbral form')+' = 1\\/{p+1}'+sum('j',0,'p',binom('p+1','j')+'B^jn^{p+1-j}','','')+' = '+frac('(B+n)^{p+1}-B^{p+1}','p+1',''),



	]).join(br)+

	refer([
		enwiki("Catalan's_conjecture"),
		enwiki('Diophantine_equation','2020-8-4'),
		enwiki("Faulhaber's_formula",'2019-11-21'),
		enwiki('Umbral_calculus','2019-11-22'),
		enwiki("Sums_of_powers",'2020-8-11'),
		
		
		

	])
),


detail(ksc(sum('i',1,'n','i^k','','')+'=1^k+2^k+⋯+n^k=(n+1)^k')+br+'Erdős猜测无'+ksc('1^1+2^1=3^1')+'之外的正整数解'+br+gM2('Erdős–Moser equation') ,

	ksc([
		'2|k且m<10^{1000000}都没有另外的解\\text{Leo Moser}',
		'6 ≤ k + 2 < m < 2k ~（1966年）',
		'lcm(1,2,⋯,200)|k~（1994年）',
		'm+1的任意素因子是不规则的(irregular)且大于1000',
		'm>1.485×10^{9321155} （1999年）',
		'200,1000区间内的素数 | k（2002年）',
		'm>2.7139 × 10^{1,667,658,416}（2009年）',


	]).join(br)+

	refer([
		enwiki("Erdős–Moser_equation",'2020-8-14'),
		enwiki('Diophantine_equation','2020-8-4'),
		enwiki("Sums_of_powers",'2020-8-11'),
		
		enwiki("Bernoulli_number",'2020-10-15'),
		enwiki("Faulhaber's_formula",'2020-10-15'),
		enwiki("Squared_triangular_number",'2020-10-15'),
		inhref('wiki.html?q=Concept/Number/Sequence/Rational'),
		

	])
),



detail(ksc('a^2+b^2=c^2 ⇔ (k‧(m^2-n^2))^2+(k‧2mn)^2=(k‧(m^2+n^2))^2')+br+
	'Pythagorean triple勾股数，其中(m,n)=1，且一奇一偶'+br+
	'当k=1时，称为a,b,c本原勾股数（3元组primitive Pythagorean triple）'+br+
	'当c是素数时，'+ksc(kmod('c=m^2+n^2','1','4')),
	ksc([
		'有理形式：(t^2-1)^2+(2t)^2=(t^2+1)^2 ~（上式等式两边同时除以n^2, 令t=m\\/n）'

	]).join(br)+
	refer([
		enwiki("Pythagorean_triple",'2020-8-14'),
		enwiki('Diophantine_equation','2020-8-4'),
		enwiki("Sums_of_powers",'2020-8-11'),
		
		
		

	])
),


detail(ksc(piece(['a^2+b^2=d^2','a^2+c^2=e^2','b^2+c^2=f^2','a^2+b^2+c^2=g^2（加上这一条，就是完美长方体）']))+br+
	'欧拉砖Euler Brick（长方体边长、面对角线都是整数），'+br+
	'如体对角线也是整数，就变成完美长方体（至今不知是否存在）',


	brA(ksc([
		'(a,b,c)是解 ⇒ '+piece(['(ka,kb,kc)（三者不互素）',
			'(bc,ac,ab)（三者乘积是完全平方）'])+'都是解（包含任意排列）',
		'已知解(a,b,c;d,e,f)',
		'任意排列也是解：',
		piece([
			'(a,b,c;d,e,f)',
			'(a,c,b;e,d,f)',
			'(b,a,c;d,f,e)',
			'(b,c,a;f,d,e)',
			'(c,a,b;e,f,d)',
			'(c,b,a;f,e,d)',
		]),
		
		'最小的解(44, 117, 240 ; 125, 244, 267) \\text{Paul Halcke in 1719}',
		'即(117, 44, 240 ; 125, 267, 244)',

		

		'参数解之一（不完全，\\text{by Nicholas Saunderson}）：',
		piece([
			'a=u|4v^2-w^2|=u|3v^2-u^2|',
			'b=v|4u^2-w^2|=v|3u^2-v^2|',
			'c=4uvw',
			'd=w^3=(u^2+v^2)w',
			'e=u(4v^2+w^2)=u(5v^2+u^2)',
			'f=v(4u^2+w^2)=v(5u^2+v^2)',
			'u^2+v^2=w^2',

		])+'→'+piece([
			'w=∛{d}',
			'u='+kfrac(['w(cf-de)','c^2-d^2'])+'=c\\/{4vw}',
			'v='+kfrac(['w(ce-df)','c^2-d^2'])+'=c\\/{4uw}',

		]),
		'使用勾股数形式代替u,v（偶数）→'+piece([
			'm>n,(m,n)=1,一奇一偶',
			'u=k(m^2-n^2)=k(m+n)(m-n)',
			'v=k(2mn)=2kmn',
			'w=k(m^2+n^2)',
			'a=k^3(m^2-n^2)|m^4-14m^2n^2+n^4|=k^3(m+n)(m-n)|(m^2+n^2)^2-(4mn)^2)|',
			'b=2k^3mn|3m^4-10m^2n^2+3n^4|=2k^3mn|3((m+n)(m-n))^2-(2mn)^2|',
			'c=8k^3mn(m^4-n^4)=8k^3mn(m+n)(m-n)(m^2+n^2)',
			'd=k^3(m^2+n^2)^3',
			'e=k^3(m^2-n^2)(m^4+18m^2n^2+n^4)=k^3(m+n)(m-n)((m^2+n^2)^2+(4mn)^2)',
			'f=2k^3mn(5m^4-6m^2n^2+5n^4)=2k^3mn(5((m+n)(m-n))^2+(2mn)^2)',

		]),

		piece(['(a,b,c)=(3^{2}‧13,2^{2}‧11,2^{4}‧3‧5)','(d,e,f)=(5^{3},3‧89,2^{2}‧61)','(u,v,w)=(3,2^2,5)','(k,m,n)=(1,2,1)','']),

		piece(['(a,b,c)=(5‧3^2‧11,2^{3}‧13‧47,2^{5}‧3‧5‧17)','(d,e,f)=(17^{3},3‧5^{2}‧109,2^{3}‧29‧41)','(u,v,w)=(3‧5,2^3,17)', '(k,m,n)=(1,4,1)','']),



		'参数解之二（不完全）：',
		piece([
			'a=u|4v^2-w^2|=u|3v^2-u^2|',
			'b=v|4u^2-w^2|=v|3u^2-v^2|',
			'c=4uvw',
			'd=w^3=(u^2+v^2)w',
			'e=u(4v^2+w^2)=u(5v^2+u^2)',
			'f=v(4u^2+w^2)=v(5u^2+v^2)',
			'u^2+v^2=w^2',

		])+'→'+piece([
			'w=∛{d}',
			'u='+kfrac(['w(cf-de)','c^2-d^2'])+'=c\\/{4vw}',
			'v='+kfrac(['w(ce-df)','c^2-d^2'])+'=c\\/{4uw}',

		]),
		'使用勾股数形式代替u,v（偶数）→'+piece([
			'm>n,(m,n)=1,一奇一偶',
			'u=k(m^2-n^2)=k(m+n)(m-n)',
			'v=k(2mn)=2kmn',
			'w=k(m^2+n^2)',
			'a=k^3(m^2-n^2)|m^4-14m^2n^2+n^4|=k^3(m+n)(m-n)|(m^2+n^2)^2-(4mn)^2)|',
			'b=2k^3mn|3m^4-10m^2n^2+3n^4|=2k^3mn|3((m+n)(m-n))^2-(2mn)^2|',
			'c=8k^3mn(m^4-n^4)=8k^3mn(m+n)(m-n)(m^2+n^2)',
			'd=k^3(m^2+n^2)^3',
			'e=k^3(m^2-n^2)(m^4+18m^2n^2+n^4)=k^3(m+n)(m-n)((m^2+n^2)^2+(4mn)^2)',
			'f=2k^3mn(5m^4-6m^2n^2+5n^4)=2k^3mn(5((m+n)(m-n))^2+(2mn)^2)',

		]),

		'含3^2‧11',

		piece(['(a,b,c)=(2^{2}‧5‧7,2^{5}‧3‧5,3^{2}‧7‧11)','(d,e,f)=(2^{2}‧5^{3},7‧101,3‧281)','(u,v,w)=(,,)']),



		piece(['(a,b,c)=(2^{5}‧5,3‧7‧11,2^{3}‧3^2‧11)','(d,e,f)=(281,2^{3}‧101,3‧5^{2}‧11)','(u,v,w)=(,,)']),

		piece(['(a,b,c)=(11‧17,2^{2}‧3‧5‧17,2^{4}‧3^2‧11)','(d,e,f)=(17‧61,5‧11‧29,2^{2}‧3‧157)','(u,v,w)=(,,)']),

		piece(['(a,b,c)=(3‧5‧13,2^{2}‧11‧17,2^{6}‧3^2‧11)','(d,e,f)=(773,3‧2113,2^{2}‧5‧11‧29)','(u,v,w)=(,,)']),


		'含2^2‧11',
		piece(['(a,b,c)=(5‧17,2^{2}‧3‧11,2^{4}‧3^{2}‧5)','(d,e,f)=(157,5^{2}‧29,2^{2}‧3‧61)','(u,v,w)=(,,)']),

		piece(['(a,b,c)=(3‧11‧13,2^{4}‧5‧11,2^{2}‧3^{2}‧5‧13)','(d,e,f)=(11‧89,3‧13‧61,2^{2}‧5^{4})','(u,v,w)=(,,)']),


		'含5^2‧11',
		piece(['(a,b,c)=(2^{4}‧3‧5,2^{2}‧3^{2}‧7,5^{2}‧11)','(d,e,f)=(2^{2}‧3‧29,5‧73,373)','(u,v,w)=(,,)']),
		piece(['(a,b,c)=(2^{4}‧3‧11,2^{2}‧3^{2}‧7‧23,5^{2}‧11‧23)','(d,e,f)=(2^{2}‧3‧5‧97,11‧577,23‧373)','(u,v,w)=(,,)']),




/*
		a^2+b^2+c^2=d^2+c^2=e^2+b^2=f^2+a^2=g^2

		设
		a/d = cos A , b/d = sin A, a/b = cot A
		a/e = cos B , c/e = sin B, a/c = cot B

		b/f = cos C , c/f = sin C, b/c = cot C = cot B / cot A 即 tan C = tan B / tan A 
			也即tan B = tan C tan A = 1- (tan A + tan B)/tan (A+B)
-----------------------------

		设
		a/g=cos X sin Y , b/g=cos X cos Y, c/g = sin X (有理数)



		a^2+b^2=d^2 = g^2 cos^2 X （显然有理数）
		a^2+c^2=e^2 = g^2( cos^2 X sin^2 Y + sin^2 X) = g^2(sin^2 Y + sin^2 X-sin^2 X sin^2 Y ) = g^2( cos^2 Y sin^2 X + sin^2 Y)
		b^2+c^2=f^2 = g^2( cos^2 X cos^2 Y + sin^2 X) = g^2(cos^2 Y + sin^2 X-sin^2 X cos^2 Y ) = g^2( sin^2 Y sin^2 X + cos^2 Y)
			
		显然cos X、   sin^2 Y、cos^2 Y  有理数 
		记sin^2 X = A, sin^2 Y = B
		cos^2 X =1-A, cos^2 Y =1-B, 
		
		A,B,1-A,1-B都是有理平方数
		B+A-AB、 AB+1-B是有理平方数

		设s,t正整数>=2，
		A=\\(\\frac{s^2-1}{s^2+1}\\)^2
		1-A=\\(\\frac{2s}{s^2+1}\\)^2
		B=\\(\\frac{2t}{t^2+1}\\)^2
		1-B=\\(\\frac{t^2-1}{t^2+1}\\)^2

		设g=(s^2+1)(t^2+1)
		


*/

		
	]).concat(['完美长方体的条件：',
		'奇数边长'+ksc('>2.5×10^{13}'),
		'最短边长'+ksc('>5×10^{11}'),

		'体对角线g奇数，既不是素数幂，也不是两个素数积，且只能含有4k+1型素因子',
		'd,e,f三条面对角线长有2个奇数1个偶数（且被4整除）',
		'边a奇数,边b,c都是偶数，且分别被4,16整除',
		'两条边长分别被3,9整除',
		'存在1条边长被5整除',
		'存在1条边长被7整除',
		'存在1条边长被11整除',
		'存在1条边长被19整除',
		'体对角线g或存在1条边，被13整除',
		'体对角线g或存在1条边、1条面对角线，被17整除',
		'体对角线g或存在1条边、1条面对角线，被29整除',
		'体对角线g或存在1条边、1条面对角线，被37整除',
	]))+
	
	refer([
		href(Hs+'arxiv.org/search/math?query=euler+brick&searchtype=all&abstracts=show&order=-announced_date_first&size=50','arxiv'),
		

	])
),


detail(ksc('a^n+b^n=c^n (n>2时无正整数解)')+' 费马大定理FLT' ,
	ksc([
		'有理形式：x^n+y^n=1 ~①~（上式等式两边同时除以c^n）',
		'对于n=3情况，被\\text{Euler}所证明',
		'下面是另一个证明思路：',
		'设y=k-x, k≠0',
		'x^3+(k-x)^3=k^3-3k^2x+3kx^2=k(3x^2-3kx+k^2)=1',
		'即3kx^2-3k^2x+k^3-1=0',
		'Δ=9k^4-4(3k)(k^3-1)=3k(3k^3-4(k^3-1))=3k(4-k^3)须为有理数的平方',
		'设k=p/q 最简形式(正整数q，整数p≠0,(p,q)=1)',
		'Δ=3(p/q)(4-(p/q)^3)=3p(4q^3-p^3)/q^4',
		'即3p(4q^3-p^3)须为整数的完全平方',

		'等价的有理方程①的1解变6解：',
		piece([
			'纵横坐标互换：(x,y) → (y,x) ',
			'x,y字母对换：(x,y) → (y,x)',
			'横坐标倒数：(x,y) → \\(1\\/x,-y\\/x\\)',
			'纵坐标倒数：(x,y) → \\(-x\\/y,1\\/y\\)',
	
			'横纵倒数：(x,y) → \\(-y\\/x,1\\/x\\)',
			'纵横倒数：(x,y) → \\(1\\/y,-x\\/y\\)',

		])
	


	]).join(br)+
	refer([
		enwiki('Symmetric_polynomial'),
		enwiki("Fermat's_Last_Theorem")

	])
),
detail(ksc('a^3+b^3=c^3+d^3')+' (有无穷多组非平凡解)'+br+
	'例如：哈代与拉马努金出租车数'+ksc('12^3 + 1^3 = 9^3 + 10^3 = 1729') ,
	ksc([
		'解的一般形式：'+piece([
			'a=1-(m-3n)(m^{2}+3n^{2})',
			'b=(m+3n)(m^{2}+3n^{2})-1',
			'c=(m+3n)-(m^{2}+3n^{2})^{2}',
			'd=(m^{2}+3n^{2})^{2}-(m-3n)',
			
		])

	]).join(br)
),


detail(ksc('a^4+b^4=c^4+d^4')+' (有无穷多组非平凡解，Euler给出多项式解)'+br+
	'例如：'+ksc('133^4 + 134^4 = 59^4 + 158^4 = 635318657') ,
	ksc([
		'解的一般形式：'+piece([
			'a=',
			'b=',
			'c=',
			'd=',
			
		])

	]).join(br)
),


detail(ksc('a^5+b^5=c^5+d^5 (有无穷多组多项式解非平凡解，但含有虚数i)'),
	ksc([
		'解的形式之一？：'+piece([
			'a,b=2t ± (t^2 − 2)',
			'c,d=2t ± i(t^2 − 2)',
			
		])

	]).join(br)
),



detail(brA([ksc('x^2-ny^2=1')+'（'+gM2('Pell Equation')+'①）',
	ksc('x^2-ny^2=-1')+'（'+gM2('Negative Pell Equation')+'②）',
	ksc('x^2-ny^2=N')+'（'+gM2('Generalized Pell Equation')+'③）',
	]),
	brA(['方程①有无穷多整数解 ⇔ n不是完全平方'+gM2('Lagrange'),
		'方程②有整数解 ⇒ n不能被4、4k+3型素数整除（因为-1是n的2次剩余）',
		'方程②，当n=1, 2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97，⋯有解',
		'x/y用于近似n的平方根',
		'方程②的解(x,y)可构造出①的解'+ksc('(x^2+ny^2, 2xy)'),
		ksc('(x^2-ny^2)^2=(-1)^2 ⇒ (x^2+ny^2)^2-n(2xy)^2=1'),

		'方程①③的解可构造出③的解',
		ksc(piece(['x_1^2-ny_1^2=1','x_2^2-ny_2^2=N'])+'⇒ (x_1x_2+ny_1y_2)^2-n(x_1y_2+x_2y_1)^2=N'),
		'这里利用'+ksc(piece(['x+y√{n}=(x_1+y_1√{n})(x_2+y_2√{n})','x-y√{n}=(x_1-y_1√{n})(x_2-y_2√{n})'])),
	])+

	detail(ksc('x^2-ny^2=1')+'列表：(n,x,y)除了(n,1,0)之外最小的解',

		Table([['n','x','y']],[
			[2,3,2],
			[3,2,1],
			[5,9,4],
			[6,5,2],
			[7,8,3],
			[8,3,1],
			[10,19,6],
			[11,10,3],
			[12,7,2],
			[13,649,180],
			[14,15,4],
			[15,4,1],
			[17,33,8],
			[18,17,4],
			[19,170,39],
			[20,9,2],
			[21,55,12],
			[22,197,42],
			[23,24,5],
			[24,5,1],
			[26,51,10],
			[27,26,5],
			[28,127,24],
			[29,9801,1820],
			[30,11,2],
			[31,1520,273],
			[32,17,3],
			[33,23,4],
			[34,35,6],
			[35,6,1],
			[37,73,12],
			[38,37,6],
			[39,25,4],
			[40,19,3],
			[41,2049,320],
			[42,13,2],
			[43,3482,531],
			[44,199,30],
			[45,161,24],
			[46,24335,3588],
			[47,48,7],
			[48,7,1],
			[50,99,14],
			[51,50,7],
			[52,649,90],
			[53,66249,9100],
			[54,485,66],
			[55,89,12],
			[56,15,2],
			[57,151,20],
			[58,19603,2574],
			[59,530,69],
			[60,31,4],
			[61,1766319049,226153980],
			[62,63,8],
			[63,8,1],
			[65,129,16],
			[66,65,8],
			[67,48842,5967],
			[68,33,4],
			[69,7775,936],
			[70,251,30],
			[71,3480,413],
			[72,17,2],
			[73,2281249,267000],
			[74,3699,430],
			[75,26,3],
			[76,57799,6630],
			[77,351,40],
			[78,53,6],
			[79,80,9],
			[80,9,1],
			[82,163,18],
			[83,82,9],
			[84,55,6],
			[85,285769,30996],
			[86,10405,1122],
			[87,28,3],
			[88,197,21],
			[89,500001,53000],
			[90,19,2],
			[91,1574,165],
			[92,1151,120],
			[93,12151,1260],
			[94,2143295,221064],
			[95,39,4],
			[96,49,5],
			[97,62809633,6377352],
			[98,99,10],
			[99,10,1],
			[101,201,20],
			[102,101,10],
			[103,227528,22419],
			[104,51,5],
			[105,41,4],
			[106,32080051,3115890],
			[107,962,93],
			[108,1351,130],
			[109,158070671986249,15140424455100],
			[110,21,2],
			[111,295,28],
			[112,127,12],
			[113,1204353,113296],
			[114,1025,96],
			[115,1126,105],
			[116,9801,910],
			[117,649,60],
			[118,306917,28254],
			[119,120,11],
			[120,11,1],
			[122,243,22],
			[123,122,11],
			[124,4620799,414960],
			[125,930249,83204],
			[126,449,40],
			[127,4730624,419775],
			[128,577,51],
		])

	)+
	refer([
		enwiki("Fermat's_theorem_on_sums_of_two_squares",'2019-11-21'),
		enwiki("Sum_of_two_squares_theorem",'2020-8-31'),
		enwiki("Brahmagupta–Fibonacci_identity",'2020-8-31'),
		enwiki("Pell's_equation",'2020-9-1'),
		

	])
),



detail('Euler幂和猜想（已被否证）Euler曾错误猜测无非平凡解：'+br+
	ksc('a_1^k+a_2^k+⋯+a_n^k=b^k ⇒ n ≥ k')+'（其中整数n,k都>1）' ,

	
	ksc([

		'k=3时成立（因为费马大定理FLT成立，则可以用反证法得知此结论）',
		'k=4、5时，不成立',

		'k>5时，是否成立未知unknown',

		'其它非反例的例子：',
		'k=4时',
		'30^4 + 120^4 + 272^4 + 315^4 = 353^4 （\\text{Norrie 1911}，最小例子）',

		'k=5时',
		'19^5 + 43^5 + 46^5 + 47^5 + 67^5 = 72^5 （\\text{Lander, Parkin, Selfridge, 1967} 最小例子）',

		'7^5 + 43^5 + 57^5 + 80^5 + 100^5 = 107^5（\\text{Sastry 1934}，第三小的例子）',
		
		'k=7时',
		'127^7 + 258^7 + 266^7 + 413^7 + 430^7 + 439^7 + 525^7 = 568^7 （\\text{Dodrill 1999}）',

		'k=8时',
		'90^8 + 223^8 + 478^8 + 524^8 + 748^8 + 1088^8 + 1190^8 + 1324^8 = 1409^8 （\\text{Chase 2000}）',
	
	]).join(br)+
	refer([
		enwiki("Euler%27s_sum_of_powers_conjecture"),
		

	])
),


detail('Euler幂和猜想的反例',

	
	ksc([
		'k=4时的一些反例：',
		'（参见方程a^3+b^3+c^3=d^4）',

		'k=5时的一些反例：',

		'27^5 + 84^5 + 110^5 + 133^5 = 144^5 （\\text{Lander，Parkin, 1966}）',
		'(−220)^5 + 5027^5 + 6237^5 + 14068^5 = 14132^5 （\\text{Scher， Seidl 1996}）',
		'55^5 + 3183^5 + 28969^5 + 85282^5 = 85359^5 （\\text{Frye 2004}）',

		'k>5时，是否成立未知unknown',

	
	]).join(br)+
	refer([
		enwiki("Euler%27s_sum_of_powers_conjecture"),
		

	])
),



detail(ksc('a^3+b^3+c^3=d^3')+' 有无穷多组非平凡解，如(3,4,5,6)=216（柏拉图数）' ,

	
	ksc([
		'3^3+4^3+5^3=6^3（令下式a=1,b=0即得）',
		'【1】(3a^{2}+5ab-5b^{2})^{3}+(4a^{2}-4ab+6b^{2})^{3}+(5a^{2}-5ab-3b^{2})^{3}=(6a^{2}-4ab+4b^{2})^{3}（拉马努金公式）',
		'同一个二次项系数依次为（3,4,5,6），（5,-4,-5,-4），（-5,6,-3,4）',
		'',
		'【2】(3a^{2}-5ab-5b^{2})^{3}+(4a^{2}+4ab+6b^{2})^{3}+(5a^{2}+5ab-3b^{2})^{3}=(6a^{2}+4ab+4b^{2})^{3}（变体b→-b 或 a↔b）',
		'同一个二次项系数依次为（3,4,5,6），（-5,4,5,4），（-5,6,-3,4）',
		'',
		'【3】b^{3}(a^{3}+b^{3})^{3}+a^{3}(a^{3}-2b^{3})^{3}+b^{3}(2a^{3}-b^{3})^{3}=a^{3}(a^{3}+b^{3})^{3}',
		'括号中三次项系数，及括号外的项的底分别为（1,1,2,1；1,-2,-1,1；b,a,b,a）',

		'',
		'【4】a^{3}(a^{3}-b^{3})^{3}+b^{3}(a^{3}-b^{3})^{3}+b^{3}(2a^{3}+b^{3})^{3}=a^{3}(a^{3}+2b^{3})^{3}（变体b→-b或 a↔b）',
		'括号中三次项系数，及括号外的项的底分别为（1,1,2,1；-1,-1,1,2；a,b,b,a）',

		'',
		'2100000可以用9种方法表示成3个立方数之和',
	
	
	
	]).join(br)+
	refer([
		enwiki("Euler%27s_sum_of_powers_conjecture"),
		

	])
),

detail(ksc('a^4+b^4+c^4=d^4')+' 有无穷多组非平凡解' ,
	ksc([
		'2682440^4 + 15365639^4 + 18796760^4 = 20615673^4（\\text{Noam ~ Elkies 1986}）',
		'(85v^2 + 484v − 313)^4 + (68v^2 − 586v + 10)^4 + (2u)^4 = (357v^2 − 204v + 363)^4',
		'其中u^2=22030 + 28849v − 56158v^2 + 36941v^3 − 31790v^4（可令v=-\\frac{31}{467}，代入上式化简）',
		'95800^4 + 217519^4 + 414560^4 = 422481^4 （\\text{Roger Frye 1988}）',
	]).join(br)+
	refer([
		enwiki("Euler%27s_sum_of_powers_conjecture"),
		

	])
),


detail(ksc('a^{4}+b^{4}+c^{4}+d^{4}=(a+b+c+d)^{4}')+' 有无穷多组非平凡解' ,
	gM('Jacobi–Madden equation')+' 解法途径：'+br+
	ksc([
		'原方程两边同时加上(a+b)^{4}+(c+d)^{4}，得到',
		'[a^{4}+b^{4}+(a+b)^{4}]+[c^{4}+d^{4}+(c+d)^{4}]=(a+b)^{4}+(c+d)^{4}+(a+b+c+d)^{4}',
		'再利用恒等式a^{4}+b^{4}+(a+b)^{4}=2(a^{2}+ab+b^{2})^{2}，得到勾股数形式',
		'(a^{2}+ab+b^{2})^{2}+(c^{2}+cd+d^{2})^{2}=\\((a+b)^{2}+(a+b)(c+d)+(c+d)^{2}\\)^{2}',
		'=\\tfrac {1}{4}\\((a+b)^{2}+(c+d)^{2}+(a+b+c+d)^{2}\\)^{2}'
	]).join(br)+br+

	ksc([
		'5400^{4}+1770^{4}+(-2634)^{4}+955^{4}=(5400+1770-2634+955)^{4}（\\text{Simcha Brudno 1964}）',
		'(-31764)^{4}+27385^{4}+48150^{4}+7590^{4}=(-31764+27385+48150+7590)^{4}（\\text{Jaroslaw Wroblewski}）',
		'1229559^4 + (-1022230)^4 + 1984340^4 + (-107110)^4 = (1229559 -1022230 + 1984340 - 107110)^4 （\\text{Seiji Tomita 2015}）',
		'561760^{4}+1493309^{4}+3597130^{4}+(-1953890)^{4}=(561760+1493309+3597130-1953890)^{4} （\\text{Seiji Tomita 2015}）',
	]).join(br)+
	refer([
		enwiki("Euler%27s_sum_of_powers_conjecture"),
		

	])
),






detail(ksc('a^4=b^4+c^2')+'无正整数解'+br+
	' (Fermat直角三角形定理，使用无限递降法证明) ' ,
	refer([
		enwiki("Fermat%27s_right_triangle_theorem"),
		

	])
),

detail(ksc('c‧p^n=a‧p^l+b‧p^m（任意素数p∤abc；l,m,n都不相等；abclmn≠0）无整数解(a,b,c)')+'（幂线性无关）'+br+
	ksc('a‧p^l+b‧p^m+c‧p^n=0（任意素数p∤abc；l,m,n都不相等；abclmn≠0）无整数解(a,b,c)')+'（可推广至超过3项）'+br+
	ksc('q^n=a‧p^l+b‧p^m（任意素数p∤ab；l,m,n都不相等；ablmn≠0）无整数解(a,b)令q=kp,c=k^n'),


	refer([
		enwiki("Fermat%27s_right_triangle_theorem"),
		

	])
),



detail(ksc('4\\/n=1\\/x+1\\/y+1\\/z')+'猜想对于任何n>1，都有正整数解'+ gM2('Erdős–Straus conjecture'),
	'等价于方程'+ksc('4xyz=yzn+xzn+xyn=n(yz+xz+xy)')
),

detail(ksc('y^2=x^3+n 椭圆曲线（其中整数n>0）')+gM2("Mordell's Equation"),
	[
	'根据对称性，一般只需考虑y>0的非平凡解',
	ksc('y^2=x^3-2')+'（y>0）只有整数解(3,5)'+gM2('Fermat'),
	ksc('y^2=x^3-4')+'（y>0）只有整数解(2,2),(5,11)'+gM2('Fermat')+'（但未给出证明）',
	ksc('y^2=x^3+1')+'（y>0）只有整数解(2,3)'+gM2('Euler')+'（但证明不完全）',
	ksc('y^2=x^3+n')+'（n>0）最多只有有限多组整数解'+gM2('Thue–Siegel–Roth')+'',

	refer([
		enwiki("Mordell_curve"),
		
	
	])
	].join(br)
),



detail(ksc('x^2+y^3=z^5')+'有解',
	ksc([
		'(q^{8+15m}p^{12+15n})^2+(q^{5+10m}p^{8+10n})^3=(q^{3+6m}p^{5+6n})^5【p-q=1型通解】',
		'参数解之一：',
		Eq([['x','(t^{10} + 12^4) (t^{20} − 12^2 522 t^{15} − 12^4 10006 t^{10} + 12^6 522 t^5 + 12^8)'],
		'(u^2 + 2^8‧3^4) (u^4 − 2^5‧3^4‧29 u^3 − 2^9‧3^4‧5003 u^2 + 2^{13}‧3^8‧29 u + 2^{16}‧3^8)',
		'(u^2+v^2)(u^4-2‧3^{2}‧29u^3v-2‧5003u^2v^2+2‧3^{2}‧29uv^3+v^4)',
		'a(a^2-2^3‧3^2‧139u^2v^2-2‧3^{2}‧29u^3v+2‧3^{2}‧29uv^3)（令a=u^2+v^2）', 'a(a^2-2‧3^{2}vu(29u^2+2^2‧139vu-29v^2))',
		'a(a^2-3^2c(29b+2‧139c))（令b=u^2-v^2，c=2uv）',
		'a(b^2-3^2‧29bc-41‧61c^2)（a^2-b^2=c^2）',


		//b^2-3^2‧29bc-41‧61c^2=a^6=(b^2+c^2)^3

		'a[(b-41c)(b+61c)-281bc]=a[(b+41c)(b-61c)-241bc]'


		]),

		Eq([['y','−t^{20} − 12^3 19 t^{15} − 12^4 494 t^{10} + 12^7 19 t^5 − 12^8'],
		'-(u^4+2^6‧3^3‧19u^3+2^9‧3^4‧13‧19u^2-2^{14}‧3^7‧19u+2^{16}‧3^8)',
		'-(u^4+2^2‧3‧19u^3v+2‧13‧19u^2v^2-2^2‧3‧19uv^3+v^4)',

		'-(a^2+2^2‧3‧19u^3v+2^2‧3‧41u^2v^2-2^2‧3‧19uv^3)（令a=u^2+v^2）', '-(a^2+2^2‧3vu(19u^2+41vu-19v^2))',
		'-(a^2+2^{2}‧3vu(19b+41vu))（令b=u^2-v^2）',
		'-(b^2+2‧3‧19bc+2^2‧31c^2)（令c=2uv，a^2-b^2=c^2）',
		'5^5c^2-(b+3‧19c)^2',

		]),






		Eq([['z','-12t(t^{10} - 12^2 11 t^5 - 12^4)'], 
		'-12t(u^2-2^4‧3^2‧11u-2^8‧3^4)',
		'-12t(u^2-11uv-v^2)',
		
		'-12t(b-11vu)（令b=u^2-v^2）',
		'12t(11c-b)（令c=2uv，a^2-b^2=c^2）',
		]),

		piece([
			'u=t^5',
			'v=12^2=2^4‧3^2',
			'注意，显然u≠±v',
			'则(a,c/2)=(b,c/2)=1，(a,b)|2(u,v)',
			'且当(u,v)=1时，t,a,b都是奇数，(a,b)=1',

		]),
		'u,t,c同号',

		piece([
			'a=u^2+v^2 ≥ c',
			'b=u^2-v^2=(u+v)(u-v)',
			'c=2uv',
			'则a^2-b^2=c^2',

		]),
		piece([
			Eq([['i','5^2c'],
				'2‧5^2uv',
				'2^5‧(3‧5)^2u'
			]),
			Eq([['j','b+7c'],
				'u^2-v^2+2‧7uv=(u+7v)^2-2(5v)^2',
				'u^2+2^5‧3^2‧7u-2^8‧3^4'
			]),
			Eq([['k','i-2j'],
				'11c-2b',
				'2(v^2+11uv-u^2)',
				'2(2^8‧3^4+2^4‧3^2‧11u-u^2)',
			]),

			Eq([['w','k^2+3k(5j)+(5j)^2'],
				'(k+5j)^2+5kj = (i+3j)^2+5kj',
				'k^2+5j(3i-j) = ki-j(j-13i)',
				'3‧5ij+y',
				'i^2+11ij-j^2',
				'41‧61c^2+3^2‧29bc-b^2',
			//	'41‧61(2uv)^2+3^2‧29(u^2-v^2)2uv-(u^2-v^2)^2',
			]),

		]),
		piece([
			Eq([['x','-aw'],

			]),

			Eq([['y','w-3‧5ij'],
				'k^2-5j^2 = ki-j(2i+j)',
				'5i^2-(2i+j)^2 = i^2-4ij-j^2',
				'(2b-11c)^2-5(b+7c)^2',
				'-(b^2+2‧3‧19bc+2^2‧31c^2)',
				'5(5^2c)^2-(b+3‧19c)^2'
				
			]),
			Eq([['z','2‧3tk'],
				'2‧3t(i-2j)',
				'2‧3t(11c-2b)',
			]),
		]),
		'令t=1=u',
		'即a=1+v^2，b=1-v^2，c=2v=2‧12^2',
		'36934790165857^2 + 240546239^3 = 267828^5',
		
		'即(89‧233‧1781105761)^2+240546239^3=(2^{2}‧3‧11‧2029)^5',

		'与Beal猜想反例关系：x=p^m是完全幂，x^2=p^{2m}',

		piece([
			'(2‧2n,3,5)与(3,4,5)矛盾',
			'(2‧3n,3,5)与(3,6,n)矛盾',
			'(2‧5n,3,5)与(3,5,5)矛盾',
			'(2‧7^n,3,5)可能有解(A,B,C至少有1个数>250000)',
			'(2‧11^n,3,5)可能有解(A,B,C至少有1个数>10000)',
			'(2‧13^n,3,5)',
		]),

		'根据(A,C)=(aw,2‧3tk)=1', 
		'则(aw,v)=(a,v)=(w,v)=(u,v)=1',
		'(t,v)=(t,2)=(t,3)=1',

		'根据(A,B)=(aw,y)=(a,y)=(w,y)=1',
		'则(w,3‧5ij)=(w,3‧5^3‧2t2^4‧3^2(b+7‧2uv))=1',
		'(k,5)=1',

		'根据(B,C)=(y,2‧3tk)=1',
		'则',
		'综上',
		'(t,2‧3)=1',
		
		

		
	]).join(br)+


	refer([
		href(Hs+'dash.harvard.edu/handle/1/2793857',"Elkies' paper on the ABC's of Number Theory (PDF)"),
		enwiki('abc_conjecture','2020-8-12'),
		enwiki('Fermat–Catalan_conjecture','2020-8-12'),
		
	
	])

),



detail(ksc('x^3+y^4=z^5')+'有解，例如：'+br+
	ksc('(2^5 3^8)^3+(2^4 3^6)^4=(2^3 3^5)^5')+'【3-2=1型】'+br+
	ksc('(2^{5+20m} 3^{8+20n})^3+(2^{4+15m} 3^{6+15n})^4=(2^{3+12m} 3^{5+12n})^5')+'【3-2=1型通解】'+br+
	ksc('(4^7 5^8 )^3 + (4^5 5^6 )^4 =(4^4 5^5 )^5 ')+'【5-4=1型】'+br+
	ksc('(4^{7+20m} 5^{8+20n})^3+(4^{5+15m} 5^{6+15n})^4=(4^{4+12m} 5^{5+12n})^5')+'【5-4=1型通解】',
	brA([


	])+


	refer([
		href(Hs+'dash.harvard.edu/handle/1/2793857',"Elkies' paper on the ABC's of Number Theory (PDF)"),
		enwiki('abc_conjecture','2020-8-12'),
		enwiki('Fermat–Catalan_conjecture','2020-8-12'),
		
	
	])

),


detail(ksc('x^a-y^b=1 (已被证明唯一正整数解3^2-2^3=1)')+br+
	gM2("Catalan's conjecture")+' （Preda Mihăilescu 2002证明，因此已是定理）',
	
	refer([
		enwiki("Catalan's_conjecture"),
		enwiki('Diophantine_equation','2020-8-4'),

	
	])
),



detail('幂差方程'+ksc('x^a-y^b=n')+'解的情况统计如下',
	'方程'+ksc('x^a-y^b=n')+
	Table([['幂差形式','=','差值','正整数解的情况']],Arrf(ksc,[
		['3^2-2^3','=','1',''],
		['3^3-5^2','=','2'],
		[Eq(['2^2-1^b','2^7-5^3']),'=','3'],
		[Eq(['2^3-2^2','6^2-2^5','5^3-11^2']),'=','4'],
		[Eq(['3^2-2^2','2^5-3^3']),'=','5'],
		['x^a-y^b','=','6','无解'],
		[Eq(['2^3-1^b','2^4-3^2','2^5-5^2','2^7-11^2','2^{15}-181^2']),'=','7'],
		[Eq(['3^2-1^b','2^4-2^3','312^2-46^3']),'=','8'],
		[Eq(['5^2-2^4','6^2-3^3','15^2-6^3','253^2-40^3']),'=','9'],
		['13^3-3^7','=','10'],
		[Eq(['3^3-2^4','6^2-5^2','56^2-5^5','15^3-58^2']),'=','11'],
		[Eq(['2^4-2^2','47^2-13^3']),'=','12'],
		[Eq(['7^2-6^2','2^8-3^5','17^3-70^2']),'=','13'],
		['x^a-y^b','=','14','无解'],
		[Eq(['2^4-1^b','2^6-7^2','(2‧569)^2-109^3']),'=','15'],
		[Eq(['5^2-3^2','2^5-2^4','12^2-2^7']),'=','16'],
		[Eq(['5^2-2^3','7^2-2^5','3^4-2^6','23^2-2^9','(2‧3‧47)^2-43^3','(3‧5^3)^2-(2^2‧13)^3','378661^2-(2‧2617)^3']),'=','17'],
		[Eq(['3^3-3^2','3^5-15^2','19^2-7^3']),'=','18'],
		[Eq(['3^3-2^3','10^2-3^4','12^2-5^3','7^3-18^2','(5‧11)^5-(2‧3‧3739)^2']),'=','19'],
		[Eq(['6^2-2^4','6^3-14^2']),'=','20'],
		[Eq(['5^2-2^2','11^2-10^2']),'=','21'],
		[Eq(['7^2-3^3','47^2-3^7']),'=','22'],
		[Eq(['3^3-2^2','2^5-3^2','12^2-11^2','2^{11}-45^2']),'=','23'],
		[Eq(['5^2-1^b','2^5-2^3','7^2-5^2','2^{10}-10^3','(2^2‧184211)^2-(2‧4079)^3']),'=','24'],
		[Eq(['5^3-10^2','13^2-12^2']),'=','25'],
		[Eq(['3^3-1^b','(5‧7)^3-(3^2‧23)^2','(43‧59)^2-23^5']),'=','26'],
		[Eq(['6^2-3^2','14^2-13^2','3^5-6^3']),'=','27'],
		[Eq(['2^5-2^2','6^2-2^3','2^6-6^2','2^7-10^2','2^9-22^2','37^3-(3‧5)^4','2^{17}-(2‧181)^2']),'=','28'],
		['15^2-14^2','=','29'],
		['83^2-19^3','=','30'],
		[Eq(['2^5-1^b','2^8-15^2']),'=','31'],
		[Eq(['6^2-2^2','2^6-2^5','3^4-7^2','(2‧3)^5-(2^3‧11)^2']),'=','32'],
		[Eq(['7^2-2^4','17^2-2^8']),'=','33'],
		['x^a-y^b','=','34','无解'],
		[Eq(['6^2-1^b','18^2-17^2','11^3-(2‧3)^4']),'=','35'],
		[Eq(['10^2-2^6','(2‧3‧7)^2-(2^2‧3)^3']),'=','36'],
		[Eq(['2^6-3^3','19^2-18^2','(2^2‧947)^2-3^{15}']),'=','37'],
		['37^2-11^3','=','38'],
		[Eq(['2^6-5^2','20^2-19^2','10^3-31^2','(2‧11)^3-103^2']),'=','39'],
		[Eq(['7^2-3^2','11^2-3^4','2^8-6^3','(2‧7)^3-(2^2‧13)^2']),'=','40'],
		[Eq(['7^2-2^3','13^2-2^7','21^2-20^2']),'=','41'],
		['x^a-y^b','=','42','无解'],
		['22^2-21^2','=','43'],
		[Eq(['5^3-3^4','12^2-10^2','13^2-5^3']),'=','44'],
		[Eq(['7^2-2^2','3^4-6^2','23^2-22^2','(3‧7)^3-(2^5‧3)^2']),'=','45'],
		['17^2-3^5','=','46'],
		[Eq(['2^7-3^4','6^3-13^2','3^5-14^2','24^2-23^2','(2^2‧3)^3-41^2','(3^2‧7)^3-(2^2‧5^3)^2']),'=','47'],
		[Eq(['7^2-1^b','2^6-2^4','13^2-11^2','(2^2‧7)^3-(2^2‧37)^2']),'=','48'],
		[Eq(['3^4-2^5','5^4-24^2','(5‧13)^3-(2^2‧131)^2']),'=','49'],
		['x^a-y^b','=','50','无解'],
		[Eq(['10^2-7^2','26^2-5^4']),'=','51'],
		['14^2-12^2','=','52'],
		[Eq(['3^6-26^2','29^3-(2^2‧3‧13)^2']),'=','53'],
		[Eq(['3^4-3^3','7^3-17^2']),'=','54'],
		[Eq(['2^6-3^2','28^2-3^6','(2^3‧7)^3-419^2']),'=','55'],
		[Eq(['2^6-2^3','3^4-5^2','15^2-13^2','(2‧3^2)^3-(2^2‧19)^2']),'=','56'],
		[Eq(['11^2-2^6','20^2-7^3','29^2-28^2']),'=','57'],
		['x^a-y^b','=','58','无解'],
		['30^2-29^2','=','59'],
		[Eq(['2^6-2^2','2^8-14^2','(2^3‧17)^3-(2‧13‧61)^2','(2^2‧19)^5-(2‧17‧1481)^2']),'=','60'],
		[Eq(['5^3-2^6','31^2-30^2']),'=','61'],
		['x^a-y^b','=','62','无解'],
		[Eq(['2^6-1^b','12^2-3^4','2^{10}-31^2','(2^3‧71)^3-13537^2']),'=','63'],
		[Eq(['10^2-6^2','2^7-2^6','17^2-15^2','24^2-2^9']),'=','64'],
		['x^a-y^a','=','z^a（a≥3）','无解（根据FLT）'],
		['x^2-y^2','=','2k+1','恒有解(k+1,k)'],
		['x^2-y^2','=','p奇素数','唯一解\\({p+1}\\/2,{p-1}\\/2\\)'],
		['x^2-y^2','=','4k','恒有解(k+1,k-1)'],

		['x^2-y^2','=','m(m+2n)【充要】','恒有解(m+n,n)'],

		['x^2-y^2','=','k^2(m^2-n^2)^2','恒有解k(m^2+n^2, 2mn)'],
		['x^2-y^2','=','4(kmn)^2（m>n）','恒有解k(m^2+n^2, m^2-n^2)'],
		['x^2-y^2','=','4k+2','无解（无法作同奇同偶因式分解）'],

		['x^2+y^2','=','(4k-1)^{4j+2}','无解（本原勾股数弦数因子须为4k+1形式）'],

		['x^3-y^3','=',['m(m^2+3mn+3n^2)【充要】','m(m^2+3n(m+n))','m((m+n)^2+n(n+m)+n^2)'].join(kbr+'='),'恒有解(m+n, n)'],

		['x^3-y^3','=',['m^3(1+3k+3k^2)','m^3(3k^2+3k+1)'].join(kbr+'='),'恒有解((k+1)m, km)'],

		['x^a-y^a','=',['m(m^{a-1}+am^{a-2}n+⋯+an^{n-1})','【充要】省略的项，利用二项式展开'].join(kbr+'='),'恒有解(m+n, n)'],

	]),'TBrc')+
	refer([
		enwiki("Catalan's_conjecture"),
		enwiki('Diophantine_equation','2020-8-4'),

	
	])
),

detail('平方差'+ksc('a^2-b^2=k'),

	detail(ksc('a^2-b^2=4k+2，即(a+b)(a-b)=2(2k+1) 无整数解(a,b)')+br+
		'（因为无法作同奇同偶的因式分解）',

		refer([
			enwiki("Fermat%27s_right_triangle_theorem"),


		])
	)+
	detail(ksc('a^2-b^2=2k+1，恒有解(k+1)^2-k^2=2k+1')+br+
		'（2k+1是素数时，正整数解唯一）',

		refer([


		])
	)+
	detail(ksc('a^2-b^2=4k，恒有解(k+1)^2-(k-1)^2=4k'),

		refer([


		])
	)+
	detail(ksc('a^2-b^2=m(m+2n)，恒有解(m+n)^2-n^2=m(m+2n)'),

		refer([


		])
	)+
	detail(ksc('a^2-b^2=k^2(m^2-n^2)^2，恒有解k(m^2+n^2, 2mn)')+br+
		ksc('a^2-b^2=4(kmn)^2，恒有解k(m^2+n^2, m^2-n^2)'),
		refer([


		])
	)
),




detail('平方和'+ksc('a^2+b^2=k'),
	detail(ksc('a^2+b^2=(4k-1)^2 无整数解(a,b)')+br+
		ksc('a^2+b^2=(4k-1)^{4j+2} 无整数解(a,b)')+br+
		'（因为本原勾股数弦数因子须为4k+1形式）',

		refer([
			enwiki("Fermat%27s_right_triangle_theorem"),


		])
	)+detail(ksc('a^2+b^2=(m^2+n^2)^2 恒有解(m^2-n^2)^2+(2mn)^2=(m^2+n^2)^2'),

		refer([

		])
	),
),



detail('立方差'+ksc('a^3-b^3=k'),

	detail(ksc('a^3-b^3=c^3，无正整数解(a,b)')+br+
		'（根据FLT）',

		refer([


		])
	)+
	detail(ksc('a^3-b^3=k(k^2+3kb+3b^2)=k[k^2+3b(k+b)]，恒有解(k+b,b)')+br+'即'+
		ksc('a^3=b^3+k^3+3bk(k+b)，恒有解(k+b,b)')+br+

		

		refer([


		])
	)+
	detail(ksc('a^3-b^3=k^3(3s^2+3s+1)=k^3((s+1)^2+s(s+1)+s^2)，恒有解((s+1)k,sk)'),

		refer([


		])
	)
),




detail('立方和'+ksc('a^3+b^3=k'),
	detail(ksc('a^3+b^3=c^3 无整数解(a,b)')+br+
		'（根据FLT）',

		refer([
			enwiki("Fermat%27s_right_triangle_theorem"),

		])
	)+detail(ksc('a^3+b^3=k(k^2-3kb+3b^2)=k[k^2-3b(k-b)] 恒有解(k-b,b)')+br+
		ksc('a^3+b^3=sb^3(s^2-3s+3)，恒有解((s-1)b,b)'), 

		refer([

		])
	),
),




detail(ksc('x^p+y^q=z^r')+' (各字母都是正整数，广义费马方程)'+br+
	gM2("Beal's conjecture")+'，即'+gM2('Tijdeman-Zagier conjecture')+' （当p,q,r>2时，(x,y,z)>1）'+br+
	gM2("Fermat–Catalan conjecture")+'（广义费马猜想）：'+br+
	'（当(x,y,z)=1（本原, 互素），且'+ksc('1\\/p + 1\\/q +1\\/r <1')+'时，只有下列有限多个非平凡解）'+br+
	'Darmon, Granville证明只有有限多个解（但没说只有下列解）',
	'满足(x,y,z)=1的解的情况统计如下'+
	ksc([
		'已知的平凡解1^m+2^3=3^2 ~(m>6)',
		'已知的9个非平凡解：',
		'2^5+7^2=3^4',
		'7^3+13^2=2^9',
		'2^{7}+17^{3}=71^{2}',
		'3^{5}+11^{4}=122^{2}=(2⋅61)^2',
		'33^{8}+1549034^{2}=15613^{3}，即(3⋅11)^8+(2⋅61⋅12697)^2=(13⋅1201)^3',
		'1414^{3}+2213459^{2}=65^{7}，即(2⋅7⋅101)^8+(479⋅14621)^2=(13⋅5)^7',
		'9262^{3}+15312283^{2}=113^{7}，即(2⋅11⋅421)^3+(7⋅53⋅149⋅277)^2=113^7',
		'17^{7}+76271^{3}=21063928^{2}，即17^7+(13⋅5867)^3=(2^3⋅79⋅33329)^2',
		'43^{8}+96222^{3}=30042907^{2}，即43^8+(2⋅3⋅7⋅29⋅79)^3=(109⋅275623)^2',
	]).join(br)+
	refer([
		enwiki("Catalan's_conjecture"),
		enwiki('Diophantine_equation','2020-8-4'),
		enwiki('Fermat–Catalan_conjecture','2020-8-12'),
		enwiki('Beal_conjecture','2020-8-11'),
		enwiki('Symmetric_polynomial'),

	])
),


detail(ksc('ax+by=c 有整数解 ⇔ (a,b)|c'),
		
	refer([
		enwiki("Bézout's_identity",'2020-9-4'),
		enwiki("Pell's_equation",'2020-9-1'),


	])
),


detail(ksc('ax+by=c，其中(a,b)=1 有通解'),
	brA(
		ksc([
			'存在整数(p,q)=1，ap+bq=1',
			'a(cp)+b(cq)=c',
			'a(cp-kb)+b(cq+ka)=c',
			'通解(cp-kb, cq+ka)',
			'特解c(p,q)，c(p-kb, q+ka)',
			'注意，当(c,k)=1时，(cp-kb, cq+ka)=1（反证法）',

		])
	)+

	refer([

	])
),

detail(ksc('ax^2+by^2+cxy+dx+ey+f=0'), [
		detail(ksc(piece(['x^2+1=kx 只有平凡整数解x=±1，即(1,2)，(-1,-2)',
				'x^2-1=kx 只有平凡整数解x=±1，即(1,0)，(-1,0)'
			])),
		brA(
			ksc(['证明：k=x+1/x，k是整数 ⇔ x=±1']),

		)+



		refer([

		])
	),


	detail(ksc(piece(['x^2-1=kx （k≠0） 无解',
				'更一般地，f(x)=a_nx^n+a_{n-1}x^{n-1}+⋯+a_2x^2+a_1x+a_0 （a_0≠0）',
				'f(x)=0 有整数解 ⇒ 只能是a_0的因子',
				'则当a_0是素数或a_0=±1，且f(±1,±a_0)≠0时无解',
			])),

		refer([

		])
	),


	detail(brA([ksc(piece(['x^2+y^2=kx',
				'xyk≠0，|x|≠|y|',
				'即不考虑平凡点(0或k,0),(k/2,±k/2)',
				'⇒ x|y',
				'若y=kx ⇒ (1+k^2)x=k ⇒ 无解',
				'若y=tx ⇒ 1+t^2=k ⇒ (有解 ⇔ k是平方加1数)',

				]))
			]),

		refer([

		])
	),

	detail(brA([ksc([piece(['x^2+y^2=kx+jy',
					'xyjk≠0，|j|≠|k|，|x|≠|y|'
				]),
				'⇔ x(x-k)=-y(y-j)',
				'若y=kx 且(1+j,1+k^2)=1 ⇒ (1+k^2)x=k(1+j) ⇒ 无解',
				'若y=tx ⇒ (1+t^2)x=k+jt ⇒ (有解 ⇒ (t,k)=1)',

				'设y=x-t ⇒ 2x^2-(2t+k+j)x+t(j+t)=0 ⇒ 若k=t, 且k+j是偶数，x=(j+k)/2,y=(j-k)/2',
		

				])
			]),

		refer([

		])
	),

	detail(ksc(piece(['x^2+y^2=kxy 只有平凡整数解y=±x，即(0,0,k)，(x,x,2)，(x,-x,-2)',
				'x^2-y^2=kxy 只有平凡整数解y=±x，即(0,0,k)，(x,x,0)，(x,-x,0)'
			])),
		brA([
			'推论',
			'除了y=±x平凡情况之外，必有',
			ksc(piece(['(x^2+y^2, xy)=1=(x^2-y^2, xy)',
				'本原勾股数中,x,y,z两两互素',
				'(x^2+y^2,x^2-y^2)|2(x,y)',



				'(x,y)=1⇒'+piece([
					'(x^2+y^2,x^2-y^2)|2',
					'(x^2+kxy+y^2,xy)=1',
					'x,y中存在偶数时 ⇒ (x^2+y^2,x^2-y^2)=1',
					'更一般地',
					piece([
						'(x^m+y^n,xy)=1',
						'((x+y)^n, xy)=1',
						'((x-y)^n, xy)=1',
						'(s,y)=(t,x)=1 ⇒ ((sx-ty)^n, xy)=1',
						'存在整数a,b，使得axy+b(x+y)=1=x(ay+b)+by=y(ax+b)+bx',
						'两个不同质数p,q ⇒ 存在整数a,b，使得apq+b(p+q)=1',
						'任意两个奇质数p,q ⇒ 存在整数a,b，使得b(p+q)=1-apq'
		
					])
				]),




			])),


		])+



		refer([

		])
	),



	detail(brA([ksc([piece(['x^3-y^2=1 无解',
			'x^3-y^2=-1 唯一解(2,±3)，Catalan解'
		]),

		])
		]),

		refer([

		])
	),

].join(br))

])+
refer([
	inhref('explore.html?q=Problem/Problem List'),
	inhref('wiki.html?q=Formula/Polynomial/Identity'),
	inhref('wiki.html?q=Formula/Sequence/Sum'),
	inhref('wiki.html?q=Concept/Number/Prime/Prime'),
]);


